EXEC_NAME=shaderdemo
#INCLUDES=include
CC=g++
#GCC_OPTIONS=-Wall -pedantic -I$(INCLUDES)
#GCC_OPTIONS=-Wall -pedantic -I../../AngelCode_F2013/include
GCC_OPTIONS=-Wall -pedantic -Iinclude
#GL_OPTIONS=-lglut -lGLEW -lGL -lXmu -lXi -lXext -lX11 -lm
GL_OPTIONS=-lglut -lGLEW
COPTIONS=$(GCC_OPTIONS) $(GL_OPTIONS)


all: $(EXEC_NAME)

#$(EXEC_NAME): initShader.o main.o GLObject3D.o ConcreteGLObject3D.o GLScene.o GLSceneAxis.o
#	$(CC) $(GL_OPTIONS) -o $(EXEC_NAME) main.o initShader.o GLObject3D.o ConcreteGLObject3D.o GLScene.o GLSceneAxis.o

$(EXEC_NAME): initShader.o main.o AbstractApplication.o SimpleGLUTApplication.o GLObject3D.o ConcreteGLObject3D.o ManipulatorGLObject.o GLScene.o AbstractGLUTWindow.o ManipulatorWindow.o
	$(CC) $(GL_OPTIONS) -o $(EXEC_NAME) initShader.o main.o AbstractApplication.o SimpleGLUTApplication.o GLObject3D.o ConcreteGLObject3D.o ManipulatorGLObject.o GLScene.o AbstractGLUTWindow.o ManipulatorWindow.o

initShader.o: initShader.cpp
	$(CC) $(GCC_OPTIONS) -c initShader.cpp

main.o: main.cpp initShader.cpp GLObject3D.cpp ConcreteGLObject3D.cpp
	$(CC) $(GCC_OPTIONS) -c main.cpp

AbstractApplication.o: AbstractApplication.cpp DebugHelper.h
	$(CC) $(GCC_OPTIONS) -c AbstractApplication.cpp

SimpleGLUTApplication.o: SimpleGLUTApplication.cpp AbstractApplication.cpp DebugHelper.h
	$(CC) $(GCC_OPTIONS) -c SimpleGLUTApplication.cpp

GLObject3D.o:	GLObject3D.cpp initShader.cpp
	$(CC) $(GCC_OPTIONS) -c GLObject3D.cpp

ConcreteGLObject3D.o:	ConcreteGLObject3D.cpp GLObject3D.cpp
	$(CC) $(GCC_OPTIONS) -c ConcreteGLObject3D.cpp

ManipulatorGLObject.o:	ManipulatorGLObject.cpp GLObject3D.cpp
	$(CC) $(GCC_OPTIONS) -c ManipulatorGLObject.cpp

#GLSceneAxis.o:	GLSceneAxis.cpp GLSceneAxis.cpp
#	$(CC) $(GCC_OPTIONS) -c GLSceneAxis.cpp

#GLScene.o:	GLScene.cpp ConcreteGLObject3D.cpp GLObject3D.cpp GLSceneAxis.cpp
#	$(CC) $(GCC_OPTIONS) -c GLScene.cpp

GLScene.o:	GLScene.cpp ConcreteGLObject3D.cpp GLObject3D.cpp
	$(CC) $(GCC_OPTIONS) -c GLScene.cpp

AbstractGLUTWindow.o: AbstractGLUTWindow.cpp SimpleGLUTApplication.cpp AbstractApplication.cpp DebugHelper.h
	$(CC) $(GCC_OPTIONS) -c AbstractGLUTWindow.cpp

ManipulatorWindow.o: ManipulatorWindow.cpp initShader.cpp AbstractGLUTWindow.cpp SimpleGLUTApplication.cpp AbstractApplication.cpp
	$(CC) $(GCC_OPTIONS) -c ManipulatorWindow.cpp


clean:
	rm -f *.o $(EXEC_NAME)

.PHONY: all clean
